{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "646efde1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         品种  交割量-本月      交割量-比重  交割量-本年累计    交割量-累计同比\n",
      "0         铜    1590    3.399833     57280    6.527804\n",
      "1     铜(BC)    1470    3.143242     21835    4.398757\n",
      "2         铝    1880    4.019929     74710  -33.431346\n",
      "3         锌     875    1.870977     34845  -49.216644\n",
      "4         铅    7560   16.165245     77230   16.126607\n",
      "5         镍    2442    5.221631     26634   41.234489\n",
      "6         锡     470    1.004982     24122   33.432902\n",
      "7       氧化铝    1440    3.079094      5250         NaN\n",
      "8        黄金    1365    2.918725      5418    5.552309\n",
      "9        白银    9466   20.240768    124720   -6.371990\n",
      "10      螺纹钢     510    1.090513     42330   95.700416\n",
      "11       线材       0    0.000000       180         NaN\n",
      "12     热轧卷板    4620    9.878761     92520   44.044839\n",
      "13      不锈钢    2232    4.772596     73932   66.558529\n",
      "14       原油     301    0.643616     40608   68.700926\n",
      "15    低硫燃料油     372    0.795433     14172  -48.957320\n",
      "16      燃料油    1730    3.699190     41964  406.200241\n",
      "17     石油沥青     518    1.107619     24412  -41.923205\n",
      "18    丁二烯橡胶       0         NaN         0         NaN\n",
      "19     天然橡胶       0         NaN     32656  123.456959\n",
      "20     20号胶     920    1.967199     16681    5.850625\n",
      "21       纸浆    7006   14.980649    107528   73.214343\n",
      "22  SCFIS欧线       0         NaN         0         NaN\n",
      "23       总计   46767  100.000000    939027   14.213102\n"
     ]
    }
   ],
   "source": [
    "import akshare as ak\n",
    "\n",
    "# 获取上期所2023年12月的交割数据\n",
    "delivery_data = ak.futures_delivery_shfe(date=\"202312\")\n",
    "print(delivery_data)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
